<template>
  <div class="swiper" :class="swiperClass">
    <div class="swiper-wrapper">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import Swiper from 'swiper';
import "swiper/css"
export default {
  props: {
    persilde: {
      type: Number,
      default: 1
    },
    swiperClass: {
      type: String,
      default: 'swiper'
    }
  },
  mounted() {
    new Swiper('.' + this.swiperClass, {
      slidesPerView: this.persilde,
      spaceBetween: 10,
      freeMode: true,
    })
  }
}
</script>

<style lang="less" scoped>
.swiper {
  background-color: #fff;
  padding-left: 10px;
  padding-right: 10px;
}
</style>